<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>transition</title>
    <style>
        .content {
            width: 500px;
            height: 500px;
            background-color: yellow;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: height 1s ease-in-out;
        }
        .content.animation {
            height: 1000px;
        }
        .content img {
            transition: transform 1s ease-in-out;
        }
        /* .content img:hover {
            transform: rotate(0.5turn);
        } */
        .content img.animation {
            transform: rotate(0.5turn);
        }
    </style>
</head>
<body>
    <div class="content">
        
        <img src="https://interactive-examples.mdn.mozilla.net/media/examples/firefox-logo.svg" width="200" alt="" class="transition">

    </div>
    <script>
        setTimeout(function (argument) {
            document.getElementsByTagName('div')[0].className = 'content animation';
        }, 2000);
    </script>
</body>
</html>